Topic 1 Question #1
Every employee of your company has a Google account. Your operational team needs to manage a large number of instances on Compute Engine. Each member of this team needs only administrative access to the servers. Your security team wants to ensure that the deployment of credentials is operationally efficient and must be able to determine who accessed a given instance. What should you do?
- A.
Generate a new SSH key pair. Give the private key to each member of your team. Configure the public key in the metadata of each instance.
- B.
Ask each member of the team to generate a new SSH key pair and to send you their public key. Use a configuration management tool to deploy those keys on each instance.
- C.
Ask each member of the team to generate a new SSH key pair and to add the public key to their Google account. Grant the ג€compute.osAdminLoginג€ role to the Google group corresponding to this team.
- D.
Generate a new SSH key pair. Give the private key to each member of your team. Configure the public key as a project-wide public SSH key in your Cloud Platform project and allow project-wide public SSH keys on each instance.
Answer: C
This question assesses core Associate Cloud Engineer knowledge of secure, scalable access management for Compute Engine instances, aligned with GCP best practices for operational efficiency and auditability. The scenario has two mandatory requirements: first, low-overhead credential deployment for a large fleet of instances, and second, the ability to trace instance access to individual team members, with all users already having existing Google accounts. The suggested answer C leverages GCP's native OS Login feature to meet both requirements. By linking each user's SSH public key to their existing Google account and granting the compute.osAdminLogin role to the team's Google group, you eliminate the need to manually deploy or update SSH keys across individual instances. All SSH access events are tied directly to the user's unique Google identity, so security teams can easily audit access via Cloud Audit Logs, fulfilling the traceability requirement. This approach also scales seamlessly as team members join or leave, as access is controlled via group membership rather than per-instance key updates. Option Analysis:
A. Incorrect. Sharing a single private key across all team members makes it impossible to trace access to individual users, violating the security team's audit requirement. Additionally, adding the public key to each instance's metadata is operationally inefficient for a large number of instances, as any key rotation or team change requires manual updates across every instance.
B. Incorrect. While this approach uses individual user keys, deploying keys to each instance via configuration management creates significant operational overhead, as you must maintain an up-to-date key list and push changes to all instances every time a team member joins or leaves. This also lacks native integration with GCP's audit logging for identity traceability compared to OS Login, and does not leverage existing Google identity infrastructure as required for optimal efficiency.
C. Correct. This approach uses GCP's OS Login feature, a native Compute Engine capability designed for scalable, secure SSH access management. Linking each user's public key to their Google account ties their SSH identity to their corporate user account. Granting the compute.osAdminLogin role to the team's Google group grants administrative SSH access to all relevant instances without manual key deployment to individual VMs. All access events are logged with the user's unique Google identity, enabling full auditability of who accessed each instance, meeting both the operational efficiency and security requirements of the scenario.
D. Incorrect. Using a shared project-wide SSH key pair means all team members use the same credentials, making it impossible to identify individual users who accessed an instance, which fails the security team's traceability requirement. Project-wide shared keys also introduce unnecessary security risk, as a compromised private key gives access to all instances in the project, and key rotation requires updating the project metadata and coordinating distribution of the new private key to all team members. Key Concepts:
1. OS Login: A native Compute Engine feature that manages SSH access to instances using Cloud IAM, eliminating the need to manually distribute and update SSH keys across VM fleets. It associates SSH keys with individual Google Cloud identities, enabling centralized access control and auditability.
2. Compute Engine OS Login IAM Roles: The compute.osAdminLogin role grants users administrative (sudo-enabled) SSH access to instances when OS Login is enabled, while the compute.osLogin role grants standard non-administrative access, supporting least privilege access principles.
3. Cloud Audit Logs for Compute Engine Access: When OS Login is enabled, all SSH access attempts are logged in Cloud Audit Logs with the associated user's unique Google identity, allowing security teams to track, investigate, and report on individual user access to instances for compliance and incident response. References:
About OS Login, Set up OS Login,
https://cloud.google.com/compute/docs/oslogin/set-up-oslogin